<template>
	<view class="container">
		<PageRender :page="page" :refreshCounter="refreshCounter" :getNextPageCounter="getNextPageCounter" theme="default"></PageRender>
	</view>
</template>

<script>
	export default {
		components: {
		},
		data() {
			return {
				uuid: '',
				info: {
				},
				refreshCounter: 0,
				getNextPageCounter: 0
			}
		},
		computed: {
			page () {
				return this.info.content || {}
			}
		},
		watch: {},
		onLoad(e) {
			this.uuid = e.uuid
			this.initData()
		},
		onShow() {
			this.refreshCounter ++
		},
		methods: {
			initData() {
				uni.showLoading({
					title: '加载中'
				})
				this.$http(`/pages/${this.uuid}`).then(res => {
					this.info = res.data.info
					
					uni.hideLoading()
				})
			},
		},
		onReachBottom () {
			this.getNextPageCounter++
			// console.log('reach bottom')
		},
		onPageScroll(e) {}
	}
</script>

<style lang="scss">
	.container{
		background-color: white;
	}
</style>
